package com.guo.worktool.Controller;


import com.guo.worktool.common.annotation.OperationLog;
import com.guo.worktool.common.core.AjaxResult;
import com.guo.worktool.common.model.RequestWorkToolBody;
import com.guo.worktool.service.NewSQLWorkToolService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static com.guo.worktool.common.core.AjaxResult.success;


@RestController
@RequestMapping("/newSql")
public class NewSQLWorkToolController {

    @Resource
    private NewSQLWorkToolService newSQLWorkToolService;

    @PostMapping("/convertStr")
    @OperationLog
    public AjaxResult convertStr(@RequestBody RequestWorkToolBody requestWorkToolBody) {
        return success(newSQLWorkToolService.strConvert(requestWorkToolBody));
    }
}
